<?php
namespace Project_725\View\Mailer\Helper;

use Project_725\FC_Api;
use Project_725\View\Mailer\Helper as Helper;
use TwinPeaks\Core as Core;

class Message extends Core\CTemplate
{
	/**
	 * @var
	 */
	private $currTemplate;
	
	function __construct()
	{
		parent::__construct('@template/message');
	}
	
	/**
	 * 
	 */
	function getContent()
	{
		switch ($this->getCurrentRule()->getId())
		{
			case FC_Api::INVITE_RID:
				if (isset($this->currTemplate))
					return $this->currTemplate;
				$this->currTemplate = new Helper\Invitation();
				return $this->currTemplate;
			
			case FC_Api::SIGNUP_RID:
				return Helper\Signup::getInstance();
				
			case FC_Api::INVITE_WITHDRAWAL:
				return Helper\InviteWithdrawal::getInstance();
		}
	}
}
